﻿using System;
using System.IO;
using System.Net;
using System.Collections.Generic;
using System.Threading.Tasks;
using NFinal;

//此代码由NFinalCompiler生成。
//http://bbs.nfinal.com
namespace $safeprojectname$.Views.Shared
{
    /// <summary>
    /// 模板类
    /// </summary>
    [View("/$safeprojectname$/Views/Shared/NavContent.cshtml")]
    public class NavContent : NFinal.View.RazorView<string>
    {
        /// <summary>
        /// 模板类初始化函数
        /// </summary>
        /// <param name="writer">写对象</param>
        /// <param name="Model">数据</param>
        public NavContent(NFinal.IO.Writer writer, string Model) : base(writer, Model)
        {
        }
        /// <summary>
        /// 输出模板内容
        /// </summary>
        public override void Execute()
        {
            this.ExecuteAsync().Wait();
        }
        /// <summary>
        /// 输出模板内容(异步)
        /// </summary>
        public override async Task ExecuteAsync()
        {
            await writer.WriteAsync("");
            await writer.WriteAsync("<nav class=\"navbar navbar-inverse navbar-fixed-top\">\r\n    <div class=\"container\">\r\n        <div class=\"navbar-header\">\r\n            <button type=\"button\" class=\"navbar-toggle\" data-toggle=\"collapse\" data-target=\".navbar-collapse\">\r\n                <span class=\"sr-only\">Toggle navigation</span>\r\n                <span class=\"icon-bar\"></span>\r\n                <span class=\"icon-bar\"></span>\r\n                <span class=\"icon-bar\"></span>\r\n            </button>\r\n            <a href=\"");
            await writer.WriteAsync(UrlHelper.GetUrl<$safeprojectname$.Controllers.IndexController>("Index"));
            await writer.WriteAsync("\" class=\"navbar-brand\">Home</a>\r\n        </div>\r\n        <div class=\"navbar-collapse collapse\">\r\n            <ul class=\"nav navbar-nav\">\r\n                <li><a href=\"");
            await writer.WriteAsync(UrlHelper.GetUrl<$safeprojectname$.Controllers.IndexController>("Index"));
            await writer.WriteAsync("\">Home</a></li>\r\n                <li><a href=\"");
            await writer.WriteAsync(UrlHelper.GetUrl<$safeprojectname$.Controllers.IndexController>("About"));
            await writer.WriteAsync("\">About</a></li>\r\n                <li><a href=\"");
            await writer.WriteAsync(UrlHelper.GetUrl<$safeprojectname$.Controllers.IndexController>("Contact"));
            await writer.WriteAsync("\">Contact</a></li>\r\n            </ul>\r\n        </div>\r\n    </div>\r\n</nav>");
        }
    }
}
